<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head th:replace="common/competition-common :: common_head(~{::link},~{::script})">
    <meta charset="utf-8">
    <meta charset="utf-8">
    <meta content="width=device-width, initial-scale=1.0" name="viewport">
    <meta content="" name="description">
    <meta content="" name="keywords">
    <!-- **********asset*************-->
    <!-- Favicons -->
    <link href="/assets/img/favicon.png" rel="icon">
    <link href="/assets/img/apple-touch-icon.png" rel="apple-touch-icon">
    <!-- Vendor CSS Files -->
    <link href="/assets/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
    <link href="/assets/vendor/bootstrap-icons/bootstrap-icons.css" rel="stylesheet">
    <link href="/assets/vendor/boxicons/css/boxicons.min.css" rel="stylesheet">
    <link href="/assets/vendor/quill/quill.snow.css" rel="stylesheet">
    <link href="/assets/vendor/quill/quill.bubble.css" rel="stylesheet">
    <link href="/assets/vendor/remixicon/remixicon.css" rel="stylesheet">
    <link href="/assets/vendor/simple-datatables/style.css" rel="stylesheet">
    <!-- Template Main CSS File -->
    <link href="/assets/css/style.css" rel="stylesheet">
    <a class="back-to-top d-flex align-items-center justify-content-center" href="#"><i
            class="bi bi-arrow-up-short"></i></a>
    <!-- Vendor JS Files -->
    <script src="/assets/vendor/apexcharts/apexcharts.min.js"></script>
    <script src="/assets/vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
    <script src="/assets/vendor/chart.js/chart.min.js"></script>
    <script src="/assets/vendor/echarts/echarts.min.js"></script>
    <script src="/assets/vendor/quill/quill.min.js"></script>
    <script src="/assets/vendor/simple-datatables/simple-datatables.js"></script>
    <script src="/assets/vendor/tinymce/tinymce.min.js"></script>
    <script src="/assets/vendor/php-email-form/validate.js"></script>
    <!-- Template Main JS File -->
    <script src="/assets/js/main.js"></script>
</head>
<body>
<div th:replace="common/competition-common::mall-header"></div>
<div th:replace="common/competition-common::competition-sidebar"></div>

﻿<main id="main" class="main">



    <section class="section profile">



        <div class="row">



            <div class="col-xl-8">



                <div class="card">



                    <div class="card-body pt-3">



                        <!-- Bordered Tabs -->

                        <ul class="nav nav-tabs nav-tabs-bordered">

                            <li class="nav-item">

                                <button class="nav-link active" data-bs-toggle="tab" data-bs-target="#profile-edit">创建团队</button>

                            </li>

                        </ul>



                        <div class="tab-pane fade show active profile-overview" id="profile-edit">



                            <!-- Team Edit Form -->

                            <form action="/toCreateTeam" method="post">



                                <div class="row mb-3">

                                    <label for="team-logo" class="col-md-4 col-lg-3 col-form-label">团队Logo</label>

                                    <div class="col-md-8 col-lg-9">

                                        <img  src="/assets/img/team-logo.jpg" alt="Team Logo" >

                                        <div class="pt-2">

                                            <a href="#" class="btn btn-primary btn-sm" title="Upload new team logo" name="team-logo" th:name="teamLogo"><i class="bi bi-upload"></i></a>

                                            <a href="#" class="btn btn-danger btn-sm" title="Remove team logo"><i class="bi bi-trash"></i></a>

                                        </div>

                                    </div>

                                </div>



                                <div class="row mb-3">

                                    <label for="team-name" class="col-md-4 col-lg-3 col-form-label">团队名称</label>

                                    <div class="col-md-8 col-lg-9">

                                        <input name="teamname" type="text" class="form-control" id="team-name" value="团队名称">

                                    </div>

                                </div>






                                <div class="row mb-3">

                                    <label for="members" class="col-md-4 col-lg-3 col-form-label">学生成员</label>

                                    <div class="col-md-8 col-lg-9">

                                        <div id="student-members">

                                            <div class="input -group mb-2">

                                                <input name="students[]" type="text" class="form-control" placeholder="学生信息">

                                                <button class="btn btn-secondary" onclick="removeInput(this)">删除</button>

                                            </div>

                                        </div>

                                    </div>

                                    <div class="col-md-12">

                                        <button class="btn btn-sm btn-primary mt-2" onclick="addStudentInput()">添加学生成员</button>

                                    </div>

                                </div>



                                <div class="row mb-3">

                                    <label for="teachers" class="col-md-4 col-lg-3 col-form-label">指导教师</label>

                                    <div class="col-md-8 col-lg-9">

                                        <div id="teacher-members">

                                            <div class="input-group mb-2">

                                                <input name="teachers[]" type="text" class="form-control" placeholder="教师信息">

                                            </div>

                                        </div>

                                    </div>


                                </div>



                                <div class="text-center">

                                    <button type="submit" class="btn btn-primary" >提交</button>

                                </div>



                            </form><!-- End Team Edit Form -->

                        </div>

                    </div> <!-- End Bordered Tabs -->

                </div>

            </div>

        </div>

    </section>

</main><!-- End #main -->



<script>

    function addStudentInput() {

        event.preventDefault();

        var studentMembersDiv = document.getElementById('student-members');

        var newInputGroup = document.createElement('div');

        newInputGroup.className = 'input-group mb-2';

        newInputGroup.innerHTML = '<input name="students[]" type="text" class="form-control" placeholder="学生信息">' +

            '<button class="btn btn-secondary" onclick="removeInput(this)">删除</button>';

        studentMembersDiv.appendChild(newInputGroup);

    }






    function removeInput(button) {

        event.preventDefault();

        button.parentElement.remove();

    }

</script>








<!-- ======= Footer ======= -->
<footer id="footer" class="footer">
    <div class="copyright">
        Copyright2024@杭州助你成才计算机信息学院
    </div>

    </div>
</footer><!-- End Footer -->


</body>

</html>